GXSetShapePattern
You can use theGXSetShapePattern
function to change the pattern information for a style object associated with a particular shape.
void GXSetShapePattern(gxShape target, const gxPatternRecord *pattern);
target
- A reference to the shape whose pattern information you want to change.
pattern
- A pointer to the new pattern information.
DESCRIPTION
TheGXSetShapePattern
function replaces the pattern information in the style object of the shape specified by thetarget
parameter with the pattern information provided by thepattern
parameter. You use thegxPatternRecord
structure to provide pattern information.Passing
nil
for thepattern
parameter indicates that you want no pattern and QuickDraw GX removes any pattern information from the target shape.If the
target
shape shares its style object with other shapes, this function makes a copy of the style object, sets the target shape to reference the copy, and changes the pattern property of the copy. (However, if the effect of this function would leave the pattern information unchanged, this function does not create a copy of the style object; instead, it returns a notice).ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil parameter_out_of_range pattern_lattice_out_of_range Notices (debugging version) pattern_already_set SEE ALSO
For a discussion of patterns, see "Patterns" on page 3-31.For examples of adding patterns to shapes, see page 3-86 through page 3-91.
For a discussion of the
gxPatternRecord
structure and a description of what types of shapes you can use as pattern shapes, see "The Pattern Structure" on page 3-106.To retrieve pattern information from a style object, use the
GXGetStylePattern
function, which is described on page 3-142. To specify pattern information for a style object, use theGXSetStylePattern
function, which is described on page 3-144.To retrieve pattern information from a style object associated with a particular shape, use the
GXGetShapePattern
function, which is described on page 3-145.To determine where pattern shapes are drawn for a particular shape, use the
GXGetShapePatternPositions
function, which is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help